<?php
header("content-type:text/html;charset=utf-8");
$phone = $_POST['phone'];
$password = $_POST['password'];
$conn = mysqli_connect("localhost:3306","root","root","ddd");
if(!$conn){
    echo "服务器出错！";
}else{
    $sql = "insert into pp(phone,password) value('$phone','$password')";
    $result = mysqli_query($conn,$sql);
    mysqli_close($conn);
    if($result){
        echo "1";//已存在不可以注册
    }else{
        echo "0";//可以注册
    }
}
?>
